package com.ruoyi.tea.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tea.mapper.TeaFactoryMapper;
import com.ruoyi.tea.domain.TeaFactory;
import com.ruoyi.tea.service.ITeaFactoryService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author hmx
 * @date 2023-03-10
 */
@Service
public class TeaFactoryServiceImpl implements ITeaFactoryService 
{
    @Autowired
    private TeaFactoryMapper teaFactoryMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param factoryId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public TeaFactory selectTeaFactoryByFactoryId(Long factoryId)
    {
        return teaFactoryMapper.selectTeaFactoryByFactoryId(factoryId);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param teaFactory 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<TeaFactory> selectTeaFactoryList(TeaFactory teaFactory)
    {
        return teaFactoryMapper.selectTeaFactoryList(teaFactory);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param teaFactory 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertTeaFactory(TeaFactory teaFactory)
    {
        teaFactory.setCreateTime(DateUtils.getNowDate());
        return teaFactoryMapper.insertTeaFactory(teaFactory);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param teaFactory 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateTeaFactory(TeaFactory teaFactory)
    {
        teaFactory.setUpdateTime(DateUtils.getNowDate());
        return teaFactoryMapper.updateTeaFactory(teaFactory);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param factoryIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteTeaFactoryByFactoryIds(Long[] factoryIds)
    {
        return teaFactoryMapper.deleteTeaFactoryByFactoryIds(factoryIds);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param factoryId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteTeaFactoryByFactoryId(Long factoryId)
    {
        return teaFactoryMapper.deleteTeaFactoryByFactoryId(factoryId);
    }
}
